package site.xuxingcan.getwcdma;

import android.content.Context;
import android.content.SharedPreferences;

public class SharedPreferenceUtil {
    private static volatile SharedPreferenceUtil instance = null;

    public static SharedPreferenceUtil getInstance(Context mContext) {
        if (instance == null) {
            synchronized (SharedPreferenceUtil.class) {
                if (instance == null) {
                    instance = new SharedPreferenceUtil(mContext);
                }
            }
        }
        return instance;
    }

    private SharedPreferences mSharedPreferences;

    private SharedPreferenceUtil(Context mContext) {
        mSharedPreferences = mContext.getSharedPreferences("default", Context.MODE_PRIVATE);
    }


    public boolean getIsShowFirstDialog() {
        return mSharedPreferences.getBoolean("ShowFirstDialog", true);
    }

    public void setIsShowFirstDialog(boolean s) {
        mSharedPreferences.edit().putBoolean("ShowFirstDialog", s).apply();
    }
}
